package com.mj.factory.processFlow;

import com.mj.factory.workOrder.WorkOrder;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
 * Created by Administrator on 2017/3/16.
 */
public interface ProcessFlowDao extends JpaRepository<ProcessFlow, Long>,
        JpaSpecificationExecutor<ProcessFlow> {

    List<ProcessFlow> findByWorkOrderOrderBySequenceNumber(WorkOrder workOrder);

    List<ProcessFlow> findAllByWorkOrderId(long workOrder_id);

    List<ProcessFlow> findByWorkOrderIdOrderBySequenceNumber(long workOrder_id);

    List<ProcessFlow> findByWorkOrderIdAndSequenceNumber(long workOrder_id,Integer sequenceNumber);
}
